# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')

class FT_07a0:
    result=[]
    analysisDecription = ['自定义消息体长度：','应答流水号：','故障码类型：','清除故障码结果：']
    analysis07a0Length=[2,2,1,1]

    def LogicAisle(self, protocolStr, header):
        msglen = protocolStr[0:4]
        header.append(self.analysisDecription[0] + msglen + '\n')
        s = protocolStr[4:8]
        header.append(self.analysisDecription[1] + s + '\n')
        type=protocolStr[8:10]
        msg=''
        if type=='00':
            msg=':DM1故障码（实时故障码）'
        elif type=='01':
            msg=':DM2故障码（历史故障码）'
        elif type=='02':
            msg = ':DM1故障码（实时故障码）和DM2故障码（历史故障码）'
        header.append(self.analysisDecription[2]+type+msg+'\n')
        jieguo=protocolStr[10:12]
        msg=''
        if jieguo=='00':
            msg=':执行完成'
        elif jieguo=='01':
            msg=':执行失败'
        header.append(self.analysisDecription[3] + jieguo + msg + '\n')
        self.result=header
